import React from 'react';
import { withRouter } from 'react-router-dom';
import { connect } from 'react-redux';
import { getOrderList } from '../../store/user/order';
import OrderDetail from '../../components/user/OrderDetail';

const mapStateToProps = state => ({
  list: state.order.list,
  loading: state.order.loading,
  totalNum: state.order.totalNum
});

const mapDispatchToProps = {
  getOrderList
};
export default withRouter(
  connect(
    mapStateToProps,
    mapDispatchToProps
  )(OrderDetail)
);
